/*
 * @Author: xiaoyan
 * @Date: 2021-09-23 11:09:26
 * @LastEditors: xiaoyan
 * @LastEditTime: 2021-09-29 16:40:37
 * @Description: 
 * @FilePath: \vue3-ts-demo\src\utils\cookies.ts
 */
import Keys from '@/constant/key'
import Cookies from 'js-cookie'

export const getToken = () => Cookies.get(Keys.tokenKey)

export const setToken = (token: string) => Cookies.set(Keys.tokenKey, token)

export const removeToken = () => Cookies.remove(Keys.tokenKey)

export const getSidebarStatus = () => Cookies.get(Keys.sidebarStatusKey)

export const setSidebarStatus = (sidebarStatus: string) => Cookies.set(Keys.sidebarStatusKey, sidebarStatus)